<?php
require_once 'form.php';

class FormCheck extends Form{
	
	public function __construct($msg,$buttonValue) {
		parent::__construct();
		
		$formField = array();
		$formField[0]['fieldName'] = "Sicher?";
		$formField[0]['fieldType'] = Form::$TYPE_SELECT;
		$formField[0]['fieldDefaultValue'] = "Nein";
		$formField[0]['fieldCheck'] = false;
		$formField[0]['fieldSelectOptions'] = "Ja::--::Nein";
		$formField[0]['fieldSelectMultiple'] = false;
		
		$this->initByData($msg,false,$buttonValue,$formField);
	}
	
	public function isChecked() {
		if($this->completeCheck()) {
			if($_POST['Sicher?'][0] == "Ja") {
				return true;
			}
		}
		return false;
	}
}
?>